// 引用网络请求中间件
import request from '../../utils/request.js';

export default {
	/**
	 * my poitns
	 * /crds/crdsRecord/{userId}
	 */
	getList({
		pageSize,
		pageNum,
		userId
	}) {
		return request({
			url: `/crds/crdsRecord/${userId}?pageSize=${pageSize}&pageNum=${pageNum}`,
			method: 'GET',
		})
	},
	balance(userId) {
		return request({
			url: `/crds/integralBalance/${userId}`,
			method: 'GET',
		})
	},
	checkinPoints(data) {
		return request({
			url: `/crds/checkinPoints`,
			method: 'POST',
			data
		})
	},
	checkinIn(data) {
		return request({
			url: `/crds/checkinIn`,
			method: 'POST',
			data
		})
	},
}